package com.sa35.fbs.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
* Generic Data Access Object Interface to be the model for other DAO interfaces.
* @author Daniel Baktiar
*/
public interface GenericDao<T, ID extends Serializable> {
    T loadById(ID id);
    T findById(ID id);
    List<T> findAll();
    void save(T domain);
    void save(Collection<? extends T> domains);
    long count();
    void delete(T entity);
    void delete(Collection<? extends T> entity);
    void flush();
    void clear();
}